# Contributor: TDY <tdy@gmx.com>
# Contributor: Manuel "ekerazha" C. (www.ekerazha.com)
# Contributor: Julien MISCHKOWITZ <wain@archlinux.fr>
pkgname=yaourt-git
pkgver=20090414
pkgrel=1
pkgdesc="A pacman wrapper with extended features and AUR support"
arch=('i686' 'x86_64' 'ppc')
url="http://www.archlinux.fr/yaourt-en/"
license=('GPL')
depends=('diffutils' 'gettext' 'pacman>=3.2.0' 'wget')
makedepends=('git')
optdepends=('aurvote: vote for your favorite AUR packages'
            'customizepkg: automatically modify PKGBUILD during install/upgrade'
            'pacman-color: fully colorized output'
            'colordiff: colorized output via `yaourt -C`')
provides=('yaourt')
conflicts=('yaourt')
backup=('etc/yaourtrc')
install=yaourt.install
source=()
md5sums=()

_gitroot=http://projects.archlinux.fr/yaourt.git
_gitname=yaourt

build() {
  cd "$srcdir"

  msg "Connecting to $_gitroot..."
  if [ -d $_gitname ]; then
    cd $_gitname && git pull origin && cd ..
  else
    git clone $_gitroot
  fi

  rm -rf $_gitname-build
  git clone $_gitname $_gitname-build
  cd $_gitname-build/src

  make DESTDIR="$pkgdir" install || return 1
}
